package com.cc.pojo.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MenuVo {
    @Schema(description = "菜单ID")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @Schema(description = "路由地址")
    @TableField("path")
    private String path;

    @Schema(description = "菜单名称/菜单名称")
    @TableField("name")
    private String name;

    @Schema(description = "父菜单ID")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "显示顺序")
    @TableField("order_num")
    private Integer orderNum;

    @Schema(description = "组件路径")
    @TableField("component")
    private String component;

    @Schema(description = "重定向地址 父菜单进入后自动进入的页面")
    @TableField("redirect")
    private String redirect;

    @Schema(description = "路由参数")
    @TableField("query")
    private String query;

    @Schema(description = "中文菜单名称")
    @TableField("title_zh_CN")
    private String titleZhCn;

    @Schema(description = "英文菜单名称")
    @TableField("title_en_US")
    private String titleEnUs;

    @Schema(description = "权限标识")
    @TableField("perms")
    private String perms;

    @Schema(description = "菜单图标")
    @TableField("icon")
    private String icon;

    @Schema(description = "是否为外链（0是 1否）")
    @TableField("is_frame")
    private Integer isFrame;

    @Schema(description = "外链地址")
    @TableField("frameSrc")
    private String frameSrc;

    @Schema(description = "是否缓存（0缓存 1不缓存）")
    @TableField("is_cache")
    private Integer isCache;

    @Schema(description = "菜单类型（M目录 C菜单 F按钮）")
    @TableField("menu_type")
    private String menuType;

    @Schema(description = "菜单状态（0显示 1隐藏）")
    @TableField("visible")
    private String visible;

    @Schema(description = "菜单状态（0正常 1停用）")
    @TableField("status")
    private String status;
    /**
     * 子菜单
     */
    @Schema(description = "子菜单")
    private List<MenuVo> children;

}
